<template>
  <div class="login-cover">
    <div class="login-wrap">
      <span class="close-btn" @click="$emit('closeLogin', false)">X</span>
      <div class="dialog-body">
        <div class="login-box">
          <div class="login-box-hd">
            <h2 class="login-box-tit">
              <a href="#">QQ登录</a>
            </h2>
          </div>
          <div class="login-box-bd">
            <div class="login-box-bd__item current">
              <iframe
                frameborder="0"
                width="100%"
                height="400"
                scrolling="no"
                src="https://graph.qq.com/oauth2.0/authorize?response_type=code&amp;client_id=100497308&amp;redirect_uri=https%3A%2F%2Fy.qq.com%2Fportal%2Fwx_redirect.html%3Flogin_type%3D1%26surl%3Dhttps%3A%2F%2Fy.qq.com%2F&amp;state=state&amp;display=pc&amp;scope=get_user_info"
                id="login_frame"
                name="login_frame"
                class="login-box-bd__ifr login-box-bd__ifr_qq"
              ></iframe>
            </div>
          </div>
          <div class="login-box-download">
            <a class="login-box-download__btn">下载客户端 体验更多内容</a>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
export default {
  name: 'MusicLogin',
}
</script>

<script lang="ts" setup>
defineEmits(['closeLogin'])
</script>

<style scoped>
.login-cover {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 99;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.3);
}
.login-wrap {
  width: 700px;
  height: 488px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: relative;
  margin: 10px;
  border: 1px solid #bfbfbf;
  box-shadow: 0 0 10px rgb(0 0 0 / 30%);
  background-color: #fff;
  font-size: 14px;
  color: #333;
}
.login-box {
}
.close-btn {
  display: inline-block;
  width: 24px;
  height: 24px;
  cursor: pointer;
  border: 0;
  background: transparent;
  font-size: 14px;
  position: absolute;
  top: 16px;
  right: 2px;
  line-height: 1;
  color: #999;
  text-decoration: none;
  z-index: 10;
}
.close-btn:hover {
  color: #31c27c;
}
.login-box-hd {
  position: relative;
  line-height: 55px;
  text-align: center;
  border-bottom: 1px solid #f2f2f2;
}
.login-box-tit {
  font-size: 16px;
  font-weight: 400;
}
.login-box-tit a {
  color: #31c27c;
  cursor: pointer;
  margin: 0 60px;
}
.login-box-bd {
  position: relative;
  overflow: hidden;
  height: 348px;
}
.login-box-bd__ifr_qq {
  margin-top: -50px;
}
.login-box-download {
  padding: 14px 0 24px;
  overflow: hidden;
  text-align: center;
}
.login-box-download__btn {
  display: inline-block;
  padding: 0 30px;
  height: 40px;
  line-height: 40px;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  border-radius: 20px;
  background-color: #31c27c;
  background-image: linear-gradient(90deg, #24ccaa, #31c27c);
}
</style>
